VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
Begin VB.Form frmAddTags 
   BackColor       =   &H00FFFFFF&
   Caption         =   "FedEx Returns"
   ClientHeight    =   7125
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11100
   Icon            =   "frmTags.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   7125
   ScaleWidth      =   11100
   StartUpPosition =   1  'CenterOwner
   Begin MSACAL.Calendar Calendar1 
      Height          =   255
      Left            =   2100
      TabIndex        =   52
      TabStop         =   0   'False
      Top             =   840
      Visible         =   0   'False
      Width           =   255
      _Version        =   524288
      _ExtentX        =   450
      _ExtentY        =   450
      _StockProps     =   1
      BackColor       =   16777215
      Year            =   2004
      Month           =   2
      Day             =   9
      DayLength       =   1
      MonthLength     =   2
      DayFontColor    =   0
      FirstDay        =   1
      GridCellEffect  =   1
      GridFontColor   =   10485760
      GridLinesColor  =   -2147483632
      ShowDateSelectors=   -1  'True
      ShowDays        =   -1  'True
      ShowHorizontalGrid=   -1  'True
      ShowTitle       =   0   'False
      ShowVerticalGrid=   -1  'True
      TitleFontColor  =   10485760
      ValueIsNull     =   -1  'True
      BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   12.01
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.CheckBox f1200 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Hold at Location"
      Height          =   255
      Left            =   2100
      TabIndex        =   10
      Top             =   3360
      Width           =   1515
   End
   Begin VB.CheckBox f1266 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Saturday Del"
      Height          =   255
      Left            =   3840
      TabIndex        =   11
      Top             =   3360
      Width           =   1455
   End
   Begin VB.TextBox f1415 
      Height          =   315
      Left            =   7380
      TabIndex        =   18
      Top             =   3480
      Width           =   1455
   End
   Begin VB.ComboBox f1273 
      Height          =   315
      Left            =   7380
      TabIndex        =   17
      Top             =   3120
      Width           =   3315
   End
   Begin VB.TextBox f1400 
      Height          =   315
      Left            =   7380
      TabIndex        =   15
      Top             =   2400
      Width           =   735
   End
   Begin VB.ComboBox f1274 
      Height          =   315
      ItemData        =   "frmTags.frx":030A
      Left            =   7380
      List            =   "frmTags.frx":030C
      TabIndex        =   16
      Top             =   2760
      Width           =   3315
   End
   Begin VB.CommandButton cmdContinue 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "C&ontinue"
      Height          =   315
      Left            =   3120
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   21
      Top             =   6660
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Cancel"
      Height          =   315
      Left            =   6720
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   23
      Top             =   6660
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdDelete 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Delete All"
      Height          =   315
      Left            =   4920
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   22
      Top             =   6660
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.TextBox f1398 
      Height          =   675
      Left            =   2040
      MultiLine       =   -1  'True
      TabIndex        =   19
      Top             =   4500
      Width           =   3315
   End
   Begin MSDataGridLib.DataGrid grdTags 
      Height          =   1155
      Left            =   360
      TabIndex        =   50
      TabStop         =   0   'False
      Top             =   5340
      Width           =   10335
      _ExtentX        =   18230
      _ExtentY        =   2037
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdAdd 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Add To Shipment"
      Height          =   315
      Left            =   7380
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   24
      Top             =   4860
      UseMaskColor    =   -1  'True
      Width           =   1455
   End
   Begin VB.TextBox txtDecVal 
      Height          =   315
      Left            =   7380
      TabIndex        =   20
      Top             =   4500
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      Height          =   315
      Left            =   2100
      TabIndex        =   39
      Top             =   480
      Width           =   3135
      Begin VB.OptionButton optExpressTag 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Express Tag"
         Height          =   255
         Left            =   1140
         TabIndex        =   1
         Top             =   60
         Width           =   1455
      End
      Begin VB.OptionButton optCallTag 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Call Tag"
         Height          =   255
         Left            =   0
         TabIndex        =   0
         Top             =   60
         Width           =   1155
      End
   End
   Begin VB.CheckBox f3231 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Residential P/U"
      Height          =   255
      Left            =   2100
      TabIndex        =   8
      Top             =   3060
      Width           =   1515
   End
   Begin VB.CheckBox f440 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Residential Del"
      Height          =   255
      Left            =   3840
      TabIndex        =   9
      Top             =   3060
      Width           =   1455
   End
   Begin VB.TextBox f116 
      Height          =   315
      Left            =   2100
      TabIndex        =   5
      Text            =   "1"
      Top             =   1920
      Width           =   735
   End
   Begin VB.TextBox f25 
      Height          =   315
      Left            =   7380
      TabIndex        =   12
      Top             =   480
      Width           =   3315
   End
   Begin VB.TextBox f2210 
      Height          =   315
      Left            =   7380
      TabIndex        =   13
      Top             =   840
      Width           =   2115
   End
   Begin VB.TextBox f1010 
      Height          =   675
      Left            =   7380
      MultiLine       =   -1  'True
      TabIndex        =   14
      Top             =   1200
      Width           =   3315
   End
   Begin VB.TextBox f20 
      Height          =   315
      Left            =   2100
      TabIndex        =   7
      Top             =   2640
      Width           =   2115
   End
   Begin VB.ComboBox f23 
      Height          =   315
      ItemData        =   "frmTags.frx":030E
      Left            =   2100
      List            =   "frmTags.frx":0318
      TabIndex        =   6
      Top             =   2280
      Width           =   3255
   End
   Begin VB.TextBox f1008 
      Height          =   315
      Left            =   2100
      TabIndex        =   4
      Top             =   1560
      Width           =   975
   End
   Begin VB.TextBox f1009 
      Height          =   315
      Left            =   2100
      TabIndex        =   3
      Top             =   1200
      Width           =   975
   End
   Begin VB.TextBox f1365 
      ForeColor       =   &H00000000&
      Height          =   315
      Left            =   2100
      TabIndex        =   2
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Special Services:"
      Height          =   255
      Index           =   7
      Left            =   540
      TabIndex        =   51
      Top             =   3060
      Width           =   1455
   End
   Begin VB.Label lbl1274 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Service Type:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5820
      TabIndex        =   49
      Top             =   2820
      Width           =   1455
   End
   Begin VB.Label lbl1415 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Declared Value:"
      Height          =   255
      Left            =   5700
      TabIndex        =   48
      Top             =   3540
      Width           =   1575
   End
   Begin VB.Label lbl1273 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Package Type:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5820
      TabIndex        =   47
      Top             =   3180
      Width           =   1455
   End
   Begin VB.Label lbl1400 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Shipment Weight:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5700
      TabIndex        =   46
      Top             =   2460
      Width           =   1575
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000080FF&
      BorderWidth     =   2
      Index           =   2
      X1              =   5820
      X2              =   10740
      Y1              =   2055
      Y2              =   2040
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Express Tag Service Information"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   255
      Left            =   5820
      TabIndex        =   45
      Top             =   2070
      Width           =   2895
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "(75 Chars Max) "
      ForeColor       =   &H000080FF&
      Height          =   255
      Index           =   6
      Left            =   5820
      TabIndex        =   44
      Top             =   1560
      Width           =   1455
   End
   Begin VB.Label lbl1398 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Item Description:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   540
      TabIndex        =   43
      Top             =   4560
      Width           =   1455
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "(80 Chars Max) "
      ForeColor       =   &H000080FF&
      Height          =   255
      Index           =   9
      Left            =   540
      TabIndex        =   42
      Top             =   4860
      Width           =   1455
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000080FF&
      BorderWidth     =   2
      Index           =   13
      X1              =   360
      X2              =   10740
      Y1              =   4140
      Y2              =   4140
   End
   Begin VB.Label Label63 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Call Tag Item Information"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   255
      Index           =   0
      Left            =   360
      TabIndex        =   41
      Top             =   4155
      Width           =   2595
   End
   Begin VB.Label lblDecVal 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Declared Value:"
      Height          =   255
      Left            =   5700
      TabIndex        =   40
      Top             =   4560
      Width           =   1575
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Pickup Type:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   4
      Left            =   360
      TabIndex        =   38
      Top             =   540
      Width           =   1635
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000080FF&
      BorderWidth     =   2
      Index           =   0
      X1              =   360
      X2              =   5340
      Y1              =   120
      Y2              =   120
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000080FF&
      BorderWidth     =   2
      Index           =   1
      X1              =   5820
      X2              =   10740
      Y1              =   135
      Y2              =   120
   End
   Begin VB.Label Label12 
      BackColor       =   &H00FFFFFF&
      Caption         =   "References/Instructions"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   255
      Left            =   5820
      TabIndex        =   36
      Top             =   150
      Width           =   2355
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000080FF&
      BorderWidth     =   2
      Index           =   22
      X1              =   5580
      X2              =   5580
      Y1              =   360
      Y2              =   3840
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Number of Pkgs:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   22
      Left            =   480
      TabIndex        =   35
      Top             =   1980
      Width           =   1515
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Reference:"
      Height          =   255
      Index           =   11
      Left            =   5820
      TabIndex        =   34
      Top             =   540
      Width           =   1455
   End
   Begin VB.Label lblf20 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "RMA #:"
      Height          =   255
      Index           =   1
      Left            =   5700
      TabIndex        =   33
      Top             =   900
      Width           =   1575
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Pickup Instructions:"
      Height          =   255
      Index           =   3
      Left            =   5820
      TabIndex        =   32
      Top             =   1260
      Width           =   1455
   End
   Begin VB.Label lblShipDate 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Dispatch Date:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   31
      Top             =   900
      Width           =   1755
   End
   Begin VB.Image Image2 
      Height          =   345
      Left            =   3180
      Picture         =   "frmTags.frx":0344
      Stretch         =   -1  'True
      Top             =   840
      Width           =   345
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "(HH:MM) "
      ForeColor       =   &H000080FF&
      Height          =   255
      Index           =   2
      Left            =   3240
      TabIndex        =   30
      Top             =   1620
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "(HH:MM) "
      ForeColor       =   &H000080FF&
      Height          =   255
      Index           =   8
      Left            =   3240
      TabIndex        =   29
      Top             =   1260
      Width           =   1095
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Pkg Ready Time:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   1
      Left            =   360
      TabIndex        =   28
      Top             =   1560
      Width           =   1635
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Last Pickup Time:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   0
      Left            =   360
      TabIndex        =   27
      Top             =   1260
      Width           =   1635
   End
   Begin VB.Label lblf20 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Bill-to Account #:"
      Height          =   255
      Index           =   0
      Left            =   420
      TabIndex        =   26
      Top             =   2700
      Width           =   1575
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      Caption         =   "Bill Shipment to:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   19
      Left            =   540
      TabIndex        =   25
      Top             =   2340
      Width           =   1455
   End
   Begin VB.Label Label11 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Pickup Information"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   255
      Left            =   360
      TabIndex        =   37
      Top             =   135
      Width           =   2055
   End
End
Attribute VB_Name = "frmAddTags"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------
' Procedure : AddTagsToMDB()
' DateTime  : 01/24/2006
' Purpose   : Adds a record to the TagsMulti database
'---------------------------------------------------------------------------------------
'
Public Sub AddTagsToMDB()
    
    Dim strQuery As String
    
    On Error GoTo EH
    g_strErrorLocation = "frmTags:AddTagsToMDB"
    
    'Build and execute the SQL statement
    strQuery = "INSERT into TagsMulti VALUES (" & SingleQuotes(f1398) & ","
    strQuery = strQuery & SingleQuotes(ImpliedDecimal(txtDecVal)) & ")"
   
    g_connFSMSClient.Execute strQuery

    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation
End Sub
Private Sub ClearItemFields()
    
    f1398 = ""
    txtDecVal = ""
    
End Sub
Private Sub cmdAdd_Click()
    
    Call AddTagsToMDB
    Call UpdateTagsGrid
    Call ClearItemFields
    f1398.SetFocus
    
End Sub

Private Sub cmdCancel_Click()
    Me.Hide
End Sub

Private Sub f1365_Change()
    
    If IsDate(f1365) Then
        If DateDiff("d", Date, CDate(f1365)) > 0 Then
            f1365.BackColor = &HC0E0FF
        ElseIf DateDiff("d", Date, CDate(f1365)) < 0 Then
            f1365 = Date
            Calendar1.Today
        Else
            f1365.BackColor = &HFFFFFF
        End If
        
   End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_Change()
' DateTime  : 1/24/2006
' Purpose   : Acct# is numeric with max length of 9
'---------------------------------------------------------------------------------------
'
Private Sub f20_Change()
    On Error GoTo EH
    g_strErrorLocation = "frmTags:f20_Change"
    
    Call SetEmptyBackcolor(f20)
    Call NumericOnly(f20, False)
    Call CheckLength(f20, 9)
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f20_LostFocus()
' DateTime  : 1/24/2006
' Purpose   : Validate Billing acct# and give error if not valid. If blank, set acct#
'             back to Bill Shipper and set focus on Billing Type field.
'---------------------------------------------------------------------------------------
'
Private Sub f20_LostFocus()
    On Error GoTo EH
    g_strErrorLocation = "frmTags:f20_LostFocus"
    
    If Not AcctNumCheckOK(f20) Then
        f20.BackColor = &HC0E0FF
        If f20 <> "" Then
            MsgBox "Invalid FedEx Account Number", vbExclamation, "Ship Error"
            f20.SetFocus
        End If
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : f23_Change()
' DateTime  : 1/24/2006
' Purpose   : Calls a routine to populate the entire text of selected payment type.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Change()
    If Len(f23) >= 1 Then
        Call SetComboSelection(f23, f23)
    End If
End Sub
'---------------------------------------------------------------------------------------
' Procedure : f23_Click()
' DateTime  : 1/24/2006
' Purpose   : Billing Type 3 is selected highlight Billing Acct# field, and
'             set focus to it, else disable acct# field.
'---------------------------------------------------------------------------------------
'
Private Sub f23_Click()
    On Error GoTo EH
    g_strErrorLocation = "frmTags:f23_Click"
    
    If Left(f23, 1) = "3" Then
        f20.Enabled = True
        If Len(f20) = 0 Then
            f20.BackColor = &HC0E0FF
            f20.SetFocus
        End If
    Else
        f20.Enabled = False
        f20 = ""
        f20.BackColor = &HFFFFFF
    End If
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub

Private Sub Form_Activate()
    
    If Left(frmShip.f1274, 2) <> "92" And Left(frmShip.f1274, 2) <> "90" Then
        optExpressTag = True
    Else
        optCallTag = True
    End If
End Sub

Private Sub Form_Load()
    
    'Load Express Tag Svcs
    f1274.AddItem "01 - FedEx Priority Overnight"
    f1274.AddItem "05 - FedEx Standard Overnight"
    f1274.AddItem "03 - FedEx 2Day"
    f1274.AddItem "06 - FedEx First Overnight"
    f1274.AddItem "20 - FedEx Express Saver"
    
    'Load Express Tag Pkging
    f1273.AddItem "01 - Your Packaging"
    f1273.AddItem "02 - FedEx Pak"
    f1273.AddItem "03 - FedEx Box"
    f1273.AddItem "04 - FedEx Tube"
    f1273.AddItem "06 - FedEx Envelope"
    
    'Set Pickup Date Calendar size
    Calendar1.Height = 2295
    Calendar1.Width = 3015
    Calendar1.Today

    f1365 = Date
    f23 = "1"
    
End Sub
'---------------------------------------------------------------------------------------
' Module    : Image2_Click()
' DateTime  : 3/16/2004
' Author    : Chris Elwell
' Purpose   : Show the ShipDate calendar
'---------------------------------------------------------------------------------------
'
Private Sub Image2_Click()
    Calendar1.Visible = True
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Calendar1_Click()
' DateTime  : 2/18/2004
' Purpose   : Puts date selected on calendar in ShipDate field.
'---------------------------------------------------------------------------------------
'
Private Sub Calendar1_DblClick()
    f1365.Text = Calendar1.Value
    Calendar1.Visible = False
End Sub

Private Sub optCallTag_Click()
    Call EnableDisableTagFields(True)
End Sub

Private Sub optExpressTag_Click()
    Call EnableDisableTagFields(False)
End Sub
'---------------------------------------------------------------------------------------
' Procedure : EnableDisableTagFields()
' DateTime  : 01/24/2006
' Purpose   : Enables/disables Call Tag and Express Tag fields
'---------------------------------------------------------------------------------------
'
Private Sub EnableDisableTagFields(ByVal blnCallTag As Boolean)
    
    'Ground Call Tag fields
    lbl1398.Enabled = blnCallTag
    f1398.Enabled = blnCallTag
    txtDecVal.Enabled = blnCallTag
    lblDecVal.Enabled = blnCallTag
    cmdAdd.Enabled = blnCallTag
    grdTags.Enabled = blnCallTag
    cmdDelete.Enabled = blnCallTag
    
    'Express Tag fields
    f1400.Enabled = Not blnCallTag
    lbl1400.Enabled = Not blnCallTag
    f1274.Enabled = Not blnCallTag
    lbl1274.Enabled = Not blnCallTag
    f1273.Enabled = Not blnCallTag
    lbl1273.Enabled = Not blnCallTag
    f1415.Enabled = Not blnCallTag
    lbl1415.Enabled = Not blnCallTag
    f1200.Enabled = Not blnCallTag
    f1266.Enabled = Not blnCallTag
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdClose_Click()
' DateTime  : 01/10/2006
' Purpose   : Close clicked, hide the form.
'---------------------------------------------------------------------------------------
'
Private Sub cmdClose_Click()
    
    Me.Hide
    frmShip.SetFocus
    
End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdDelete_Click()
' DateTime  : 01/24/2006
' Purpose   : Verifes user wished to delete all Items in a Call Tag and if yes, calls
'           : DeleteTagMulti and UpdateTagGrid.
'---------------------------------------------------------------------------------------
'
Private Sub cmdDelete_Click()
    Dim intRet As Integer

    intRet = MsgBox("Are you sure you wish to delete all pieces in this shipment?", vbYesNo, "Confirm Delete All")
    If intRet = vbYes Then
        Call DeleteTagsMulti
        Call UpdateTagsGrid
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : cmdSaveExit_Click()
' DateTime  : 01/24/2006
' Purpose   : Assign global vars and exit
'---------------------------------------------------------------------------------------
'
Private Sub cmdContinue_Click()
    
    Call AssignTagsGlobalVars
    If optCallTag Then
        Call SendData(BuildCallTagTrans)
    Else
        Call SendData(BuildExpressTagTrans)
    End If
    
End Sub

'---------------------------------------------------------------------------------------
' Module    : DeleteTagsMulti()
' DateTime  : 1/24/2006
' Author    : Chris Elwell
' Purpose   : Deletes records for an Order ID in the LTLMulti table.
'---------------------------------------------------------------------------------------
'
Public Sub DeleteTagsMulti()
    
    On Error GoTo EH
    g_strErrorLocation = "frmBOL:DeleteCallTagMulti"
    
    Dim strQuery As String
    
    strQuery = "DELETE FROM TagsMulti"
    
    g_connFSMSClient.Execute strQuery
    
    Exit Sub
EH:
    MsgBox Err.Description, vbCritical, g_strErrorLocation

End Sub
'---------------------------------------------------------------------------------------
' Procedure : grdTags_BeforeDelete()
' DateTime  : 1/24/2005
' Purpose   : Verify user wishes to delete a record in the Call Tag grid.
'---------------------------------------------------------------------------------------
'
Private Sub grdTags_BeforeDelete(Cancel As Integer)
    Dim intResult As Integer
    
    intResult = MsgBox("Are you sure that you want to delete selected record?", vbYesNo, "Delete Confirmation")
   
    If intResult = vbNo Then
        Cancel = True
    End If

End Sub
'---------------------------------------------------------------------------------------
' Procedure : UpdateTagsGrid()
' DateTime  : 3/19/2004
' Purpose   : Update the datagrid for given OrderID. Also assign column captions.
' Call from : Form_Activate, cmdAddMPS_Click, frmShip.f1_LostFocus,
'             cmdDelete_Click,
'---------------------------------------------------------------------------------------
'
Public Sub UpdateTagsGrid()
    
    On Error GoTo EH
    g_strErrorLocation = "frmTags:UpdateTagsGrid"
    
    Dim strQuery As String
    
    'Build and open the recordset
    strQuery = "SELECT * FROM TagsMulti"
    
    If g_rsTags.State = adStateOpen Then g_rsTags.Close
    
    g_rsTags.Open strQuery, g_connFSMSClient, adOpenStatic, adLockOptimistic

    Set grdTags.DataSource = g_rsTags
    With grdTags
        .ClearFields
        .ReBind
        .Columns(0).Caption = "Item Description"
        .Columns(1).Caption = "Dec Val"
    End With
    
    Exit Sub
    
EH:
    'Added to ignore "Operation not allowed in this context" error
    If Err.number <> 3219 Then
        MsgBox Err.Description, vbCritical, g_strErrorLocation
    End If
End Sub

